/* ---------- PluginHubList ----------*/
.plugin-hub-list {
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
}

.side-bar-list {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    border-right: 1px solid var(--Colors-Use-Neutral-Border);
    border-left: 1px solid var(--Colors-Use-Neutral-Border);
    background: var(--Colors-Use-Neutral-Bg-Hover);
}
.side-bar-list-item {
    padding: 12px 4px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    cursor: pointer;
    border-bottom: 1px solid var(--Colors-Use-Neutral-Border);
    position: relative;
    user-select: none;
    .item-text {
        color: var(--Colors-Use-Neutral-Text-1-Title);
        font-size: 12px;
        font-weight: 600;
        line-height: 16px;
        writing-mode: vertical-rl;
        text-orientation: sideways-right;
        transform: rotate(180deg);
    }
    svg {
        width: 16px;
        height: 16px;
        color: var(--Colors-Use-Neutral-Text-3-Secondary);
    }
}
.side-bar-list-item:hover {
    background-color: var(--Colors-Use-Neutral-Bg-Hover);
}
.side-bar-list-item-active {
    background-color: var(--Colors-Use-Main-Primary);
    border-bottom-color: var(--Colors-Use-Main-Primary);
    .item-text {
        color: var(--Colors-Use-Main-On-Primary);
    }
    svg {
        color: var(--Colors-Use-Main-On-Primary);
    }
    &::before {
        position: absolute;
        width: 1px;
        height: calc(100% + 1px);
        content: "";
        top: 0;
        left: -1px;
        background-color: var(--Colors-Use-Main-Primary);
    }
    &::after {
        position: absolute;
        width: 1px;
        height: calc(100% + 1px);
        content: "";
        top: 0;
        right: -1px;
        background-color: var(--Colors-Use-Main-Primary);
    }
}
.side-bar-list-item-active:hover {
    background-color: var(--Colors-Use-Main-Hover);
    border-bottom-color: var(--Colors-Use-Main-Hover);
    &::before {
        background-color: var(--Colors-Use-Main-Hover);
    }
    &::after {
        background-color: var(--Colors-Use-Main-Hover);
    }
}
.side-bar-list-item-selected {
    background-color: var(--Colors-Use-Neutral-Text-4-Help-text);
    border-bottom-color: var(--Colors-Use-Neutral-Text-4-Help-text);
    .item-text {
        color: var(--Colors-Use-Neutral-Text-1-Title);
    }
    svg {
        color: var(--Colors-Use-Neutral-Text-1-Title);
    }
    &.side-bar-list-item-active::before {
        background-color: var(--Colors-Use-Neutral-Text-4-Help-text);
    }
    &.side-bar-list-item-active::after {
        background-color: var(--Colors-Use-Neutral-Text-4-Help-text);
    }
}
.side-bar-list-item-selected:hover {
    background-color: var(--Colors-Use-Main-Hover);
    border-bottom-color: var(--Colors-Use-Main-Hover);
    .item-text {
        color: var(--Colors-Use-Main-On-Primary);
    }
    svg {
        color: var(--Colors-Use-Main-On-Primary);
    }
    &.side-bar-list-item-active::before {
        background-color: var(--Colors-Use-Main-Hover);
    }
    &.side-bar-list-item-active::after {
        background-color: var(--Colors-Use-Main-Hover);
    }
}

.hub-list-body {
    flex: 1;
    overflow: hidden;
    .side-content {
        width: 100%;
        height: 100%;
    }
    .side-hidden-content {
        display: none;
    }
}

/* ---------- HubListOnline & HubListOwn & HubListLocal & HubListRecycle ----------*/
.plugin-hub-tab-list {
    width: 100%;
    height: 100%;
    overflow: hidden;

    .outer-list {
        :global {
            .ant-modal-mask {
                position: absolute;
            }
            .ant-modal-wrap {
                position: absolute;
            }
        }

        height: 100%;
        display: flex;
        .list-filter {
            height: 100%;
        }
        .list-body {
            flex: 1;
            overflow: hidden;
            height: 100%;
        }
    }
    .inner-list {
        width: 410px;
        height: 100%;
    }

    .hidden-view {
        display: none;
    }
}
.plugin-hub-tab-detail-list {
    width: 410px;
    border-right: 1px solid var(--Colors-Use-Neutral-Border);
}
.hub-list-header-extra {
    display: flex;
    align-items: center;
    gap: 8px;
}
.hub-list-header-right-extra {
    display: flex;
    align-items: center;
    .divider-style {
        width: 1px;
        height: 12px;
        background-color: var(--Colors-Use-Neutral-Border);
    }
    .exclamationcircleIcon {
        svg {
            width: 16px;
            height: 16px;
            color: var(--Colors-Use-Neutral-Text-3-Secondary);
        }
    }
}

.hub-list-empty {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    .refresh-buttons {
        display: flex;
        justify-content: center;
        gap: 8px;
        margin-top: 16px;
    }
}

.hub-detail-list-extra {
    display: inline-flex;
    align-items: center;
    gap: 4px;

    .divider-style {
        width: 1px;
        height: 12px;
        background-color: var(--Colors-Use-Basic-Background);
    }

    path {
        stroke-width: 1.5;
    }
}

.local-list-divider-style {
    width: 1px;
    height: 12px;
    background-color: var(--Colors-Use-Basic-Background);
}

/* ---------- HubListFilter ----------*/
.hub-list-filter {
    width: 224px;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--Colors-Use-Neutral-Border);
    opacity: 1;
    transition:
        width 0.2s ease,
        opacity 0.2s ease;

    &-header {
        width: 100%;
        display: flex;
        padding: 12px 12px 12px 16px;
        align-items: center;
        color: var(--Colors-Use-Neutral-Text-1-Title);
        font-size: 12px;
        line-height: 16px;
        border-bottom: 1px solid var(--Colors-Use-Neutral-Border);
    }

    &-body {
        width: 100%;
        flex: 1;
        overflow: hidden auto;
    }

    .filter-collapse {
        width: 100%;
        :global {
            .ant-collapse-expand-icon {
                display: flex;
                align-items: center;
            }
            .ant-collapse-content-box {
                padding: 0 4px 12px !important;
            }
            .ant-collapse-item .ant-collapse-header {
                padding-left: 10px;
                padding-right: 10px;
            }
            .ant-collapse-item:first-child > .ant-collapse-header {
                border-top: 0;
            }
        }
        .clear-btn {
            padding-right: 4px;
        }
        .list-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-radius: 4px;
            padding: 6px 12px 8px 6px;
            cursor: pointer;
            &:hover {
                background-color: var(--Colors-Use-Neutral-Bg);
            }
            .list-item-left {
                display: flex;
                align-items: center;
                gap: 12px;
                overflow: hidden;
                margin-right: 12px;
                padding-left: 2px;
                line-height: 16px;
                .item-title {
                    max-width: 120px;
                    overflow: hidden;
                    color: var(--Colors-Use-Neutral-Text-1-Title);
                    font-size: 12px;
                    line-height: 16px;
                }
            }
            .list-item-extra {
                color: var(--Colors-Use-Neutral-Text-3-Secondary);
                text-align: right;
                font-size: 12px;
                line-height: 16px;
            }
        }
        .list-item-active {
            color: var(--Colors-Use-Main-Primary);
            .list-item-left {
                .item-title {
                    color: var(--Colors-Use-Main-Primary);
                }
            }
            .list-item-extra {
                color: var(--Colors-Use-Main-Primary);
            }
        }
    }
    .to-end {
        text-align: center;
        color: var(--Colors-Use-Neutral-Text-3-Secondary);
        font-size: 11px;
        padding-top: 12px;
        padding-bottom: 24px;
    }
}
.hub-list-filter-hidden {
    width: 0;
    opacity: 0;
}

/* ---------- HubOuterList ----------*/
.hub-outer-list {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.hub-outer-list-header {
    padding: 12px 16px 12px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--Colors-Use-Neutral-Border);
    .title-style {
        color: var(--Colors-Use-Neutral-Text-1-Title);
        font-size: 16px;
        font-weight: 600;
        line-height: 24px;
    }
    .extra-wrapper {
        display: flex;
        align-items: center;
        .divider-style {
            margin: 0 16px;
            width: 1px;
            height: 16px;
            background-color: var(--Colors-Use-Neutral-Bg);
        }
    }
}

.hub-outer-list-tab {
    margin-top: 12px;
    margin-left: 12px;
}

.hub-outer-list-body {
    flex: 1;
    overflow: hidden;
    padding: 12px 16px 12px 12px;
    display: flex;
    flex-direction: column;

    &-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        &-left {
            display: flex;
            align-items: center;
            gap: 16px;
            .header-check {
                display: flex;
                align-items: center;
                gap: 4px;

                color: var(--Colors-Use-Neutral-Text-1-Title);
                font-size: 12px;
            }
            .total-and-selected {
                height: 16px;
                display: flex;
                align-items: center;
                gap: 8px;

                color: var(--Colors-Use-Neutral-Text-3-Secondary);
                font-size: 12px;
                line-height: 16px;
                .divider-style {
                    width: 1px;
                    height: 12px;
                    background-color: var(--Colors-Use-Neutral-Bg);
                }
                .num-style {
                    color: var(--Colors-Use-Main-Primary);
                }
            }
        }
        .header-filter-tag {
            display: flex;
            align-items: center;
            .tag-total {
                padding: 4px 8px;
                display: flex;
                align-items: center;
                gap: 8px;
                border-radius: 4px;
                border: 1px solid var(--Colors-Use-Neutral-Border);
                background: var(--Colors-Use-Neutral-Bg);
                cursor: pointer;

                color: var(--Colors-Use-Neutral-Text-1-Title);
                font-size: 12px;
                line-height: 16px;
                height: 24px;
                .total-style {
                    color: var(--Colors-Use-Main-Primary);
                }
                svg {
                    color: var(--Colors-Use-Neutral-Text-3-Secondary);
                }
            }
            .tag-total-active {
                border: 1px solid var(--Colors-Use-Main-Border);
                background: var(--Colors-Use-Main-Bg);
            }

            svg {
                width: 12px;
                height: 12px;
                cursor: pointer;
            }
        }
    }
    &-container {
        margin-top: 8px;
        flex: 1;
        overflow: hidden;
    }
}
.hub-outer-list-group-popover {
    padding-top: 4px;
    :global {
        .ant-popover-inner {
            border-radius: 4px;
        }
        .ant-popover-inner-content {
            padding: 12px;
        }
        .ant-popover-arrow {
            left: 110px;
        }
    }
}
.hub-outer-list-filter-popover {
    padding-top: 4px;
    :global {
        .ant-popover-inner {
            border-radius: 4px;
        }
        .ant-popover-inner-content {
            padding: 12px;
        }
        .ant-popover-arrow {
            left: 6px;
        }
    }
}
.hub-outer-list-filter {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    max-width: 345px;
    max-height: 60vh;
    span {
        width: max-content;
    }
}

/* ---------- HubGridList ----------*/
.hub-grid-list {
    width: 100%;
    height: 100%;
    overflow: hidden auto;
    overflow-anchor: none;
    .no-more-wrapper {
        width: 100%;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--Colors-Use-Neutral-Disable);
        font-size: 12px;
    }
    .loading-wrapper {
        width: 100%;
        height: 32px;
        .loading-style {
            align-items: center;
        }
    }
}
.hub-grid-list-row {
    display: flex;
    align-items: center;
    &:nth-child(n + 2) {
        margin-top: 16px;
    }
}

.hub-grid-list-opt {
    overflow: hidden;
    &:not(:last-child) {
        padding-right: 8px;
    }
    &:nth-child(n + 2) {
        padding-left: 8px;
    }
}
.grid-opt-2 {
    flex: 0 0 50%;
    max-width: 50%;
}
.grid-opt-3 {
    flex: 0 0 33.3333%;
    max-width: 33.3333%;
}
.grid-opt-4 {
    flex: 0 0 25%;
    max-width: 25%;
}
.grid-opt-5 {
    flex: 0 0 20%;
    max-width: 20%;
}

/* ---------- HubGridOpt ----------*/
.hub-grid-opt {
    width: 100%;
    min-width: 170px;
    height: 210px;
    overflow: hidden;
    position: relative;
    .opt-body {
        height: 100%;
        padding-top: 12px;
        display: flex;
        flex-direction: column;
        border-radius: 8px;
        border: 1px solid var(--Colors-Use-Neutral-Border);
        background: var(--Colors-Use-Basic-Background);
        .opt-content {
            flex: 1 0 0;
            padding: 0px 12px;
            display: flex;
            flex-direction: column;
            gap: 12px;
            .title-wrapper {
                padding-right: 28px;
                padding-bottom: 7px;
                display: flex;
                align-items: center;
                gap: 8px;
                border-bottom: 1px solid var(--Colors-Use-Neutral-Border);
                .title-style {
                    max-width: calc(100% - 91px);
                    height: 20px;
                    overflow: hidden;
                    color: var(--Colors-Use-Neutral-Text-1-Title);
                    font-size: 14px;
                    font-weight: 600;
                    line-height: 20px;
                }
            }
            .content-wrapper {
                height: 104px;
                display: flex;
                flex-direction: column;
                gap: 12px;
                .tags-wrapper {
                    width: 100%;
                    height: 22px;
                    display: flex;
                    align-items: center;
                    gap: 4px;
                    .tag-list {
                        flex: 1 0 0;
                        height: 100%;
                        line-height: 16px;
                        overflow: hidden;
                    }
                    .tag-opt {
                        max-width: 100%;
                        height: 22px;
                        margin-right: 4px;
                        padding: 2px 6px;
                        display: inline-flex;
                        align-items: center;
                        border-radius: 4px;
                        border: 1px solid var(--Colors-Use-Neutral-Border);
                        background: var(--Colors-Use-Neutral-Bg);
                        .text-style {
                            max-width: 100%;
                            height: 100%;
                            overflow: hidden;
                            color: var(--Colors-Use-Neutral-Text-3-Secondary);
                            font-size: 12px;
                        }
                    }
                }

                .help-wrapper {
                    width: 100%;
                    height: 32px;
                    overflow: hidden;
                    color: var(--Colors-Use-Neutral-Text-3-Secondary);
                    font-size: 12px;
                    line-height: 16px;
                    word-break: break-word;
                }

                .user-wrapper {
                    width: 100%;
                    display: flex;
                    justify-content: space-between;
                    .user-body {
                        flex: 1 0 0;
                        overflow: hidden;
                        display: flex;
                        align-items: center;
                        gap: 4px;
                        .user-style {
                            max-width: 90px;
                            height: 16px;
                            overflow: hidden;
                            color: var(--Colors-Use-Neutral-Text-1-Title);
                            font-size: 12px;
                            line-height: 16px;
                        }
                    }
                    .contribute-body {
                        display: flex;
                        .img-style {
                            width: 28px;
                            height: 28px;
                            overflow: hidden;
                            border-radius: 28px;
                            border: 1px solid var(--Colors-Use-Neutral-Bg);
                        }
                        .more-style {
                            width: 28px;
                            height: 28px;
                            overflow: hidden;
                            display: flex;
                            justify-content: center;
                            align-items: center;
                            border-radius: 28px;
                            border: 1px solid var(--Colors-Use-Neutral-Bg);
                            background-color: var(--Colors-Use-Basic-Background);
                            color: var(--Colors-Use-Neutral-Text-3-Secondary);
                            font-size: 12px;
                        }
                        .img-style + .img-style {
                            margin-left: -8px;
                        }
                        .img-style + .more-style {
                            margin-left: -8px;
                        }
                    }
                }
            }
        }

        .opt-footer {
            padding: 7px 12px 8px 12px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-radius: 0px 0px 8px 8px;
            border-top: 1px solid var(--Colors-Use-Neutral-Border);
            background: var(--Colors-Use-Neutral-Bg);
            .footer-time {
                display: flex;
                align-items: center;
                gap: 4px;
                color: var(--Colors-Use-Neutral-Text-3-Secondary);
                font-size: 12px;
                line-height: 16px;
                svg {
                    width: 16px;
                    height: 16px;
                    color: var(--Colors-Use-Neutral-Text-3-Secondary);
                }
            }
            .extra-footer {
                flex: 1 0 0;
                overflow: hidden;
            }
        }
    }
    .opt-active-body {
        border-color: var(--Colors-Use-Main-Border);
    }

    .opt-check-wrapper {
        position: absolute;
        top: 0;
        right: 0;
        width: 28px;
        height: 28px;
        display: flex;
        background-color: transparent;
        cursor: pointer;
        z-index: 3;
        svg {
            width: 28px;
            height: 28px;
            color: var(--Colors-Use-Neutral-Disable);
        }
    }
    .opt-check-active {
        svg {
            color: var(--Colors-Use-Main-Primary);
        }
    }
}

/* ---------- HubDetailList ----------*/
.hub-detail-list {
    width: 100%;
    height: 100%;
    border-right: 1px solid var(--Colors-Use-Neutral-Border);
    padding: 12px 4px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    .filter-header {
        display: flex;
        flex-direction: column;
        padding: 0 8px;
        .header-search {
            display: flex;
            align-items: center;
            margin-bottom: 16px;
        }
        .filter-body {
            display: flex;
            justify-content: space-between;
            align-items: center;
            .display-show {
                display: flex;
                .all-check {
                    margin-right: 16px;
                    display: flex;
                    align-items: center;
                    gap: 4px;
                    color: var(--Colors-Use-Neutral-Text-1-Title);
                    font-size: 12px;
                    line-height: 16px;
                }
                .count-num {
                    color: var(--Colors-Use-Neutral-Text-3-Secondary);
                    font-size: 12px;
                    line-height: 16px;
                    .num-style {
                        color: var(--Colors-Use-Main-Primary);
                    }
                }
                .divider-style {
                    margin: 2px 8px;
                    width: 1px;
                    height: 12px;
                    background-color: var(--Colors-Use-Neutral-Bg);
                }
            }
        }
    }
    .filter-list {
        flex: 1;
        overflow: hidden;
    }
}

/* ---------- HubDetailListOpt ----------*/
.hub-detail-list-opt {
    .opt-wrapper {
        width: 100%;
        height: 46px;
        padding-left: 6px;
        padding-right: 8px;
        display: flex;
        align-items: center;
        border-radius: 4px;
        border: 1px solid transparent;

        .plugin-details-item {
            flex: 1 0 0;
            overflow: hidden;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 8px 0;
            border-top: 1px solid var(--Colors-Use-Neutral-Border);
            border-bottom: 1px solid transparent;
            .plugin-details-item-info {
                flex: 1 0 0;
                overflow: hidden;
                display: flex;
                align-items: center;
                gap: 8px;
                padding-left: 2px;
                &-text-style {
                    flex: 1 0 0;
                    overflow: hidden;
                    color: var(--Colors-Use-Neutral-Text-1-Title);
                    font-size: 12px;
                    line-height: 16px;
                }
            }
            .plugin-details-item-show {
                min-width: 80px;
                display: flex;
                justify-content: right;
                align-items: center;
                gap: 8px;
                &-icon-style {
                    svg {
                        width: 16px;
                        height: 16px;
                        color: var(--Colors-Use-Neutral-Text-3-Secondary);
                    }
                }
            }
        }
    }

    .opt-wrapper-enableClick {
        cursor: pointer;
        &:hover {
            background-color: var(--Colors-Use-Neutral-Bg);
            .plugin-details-item {
                border-color: transparent;
            }
        }
    }
}
.opt-wrapper-enableClick:hover + .opt-wrapper-enableClick {
    .plugin-details-item {
        border-color: transparent;
    }
}
// 详情-插件列表单项-源码弹窗
.terminal-popover {
    width: 429px;
    padding-bottom: 4px;
    padding-top: 4px;
    :global {
        .ant-popover-inner-content {
            height: 40vh;
            padding: 4px;
        }

        .ant-popover-inner {
            border-radius: 4px;
        }

        .ant-popover-arrow {
            left: 0;
        }
    }
}

/* ---------- FooterExtraBtn ----------*/
.footer-extra-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 6px;
    border-radius: 4px;
    cursor: pointer;

    .title-style {
        color: var(--Colors-Use-Neutral-Text-1-Title);
        font-size: 12px;
        font-weight: 400;
        line-height: 16px;
    }

    svg {
        width: 16px;
        height: 16px;
        color: var(--Colors-Use-Neutral-Text-3-Secondary);
    }
    path {
        stroke-width: 1.5;
    }
    @keyframes loadingCircle {
        100% {
            transform: rotate(360deg);
        }
    }
    .loading {
        svg {
            color: var(--Colors-Use-Main-Primary);
        }
        -webkit-animation: loadingCircle 1s infinite linear;
        animation: loadingCircle 1s infinite linear;
    }

    &:hover {
        background-color: var(--Colors-Use-Neutral-Bg-Hover);
    }
}

/* ---------- OnlineOptFooterExtra ----------*/
.stared-icon {
    svg {
        color: var(--Colors-Use-Main-Primary);
    }
}

/* ---------- OnlineOptFooterExtra & OwnOptFooterExtra & RecycleOptFooterExtra ----------*/
.hub-opt-footer-extra {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    .divider-style {
        width: 1px;
        height: 12px;
        background-color: var(--Colors-Use-Neutral-Border);
    }
    path {
        stroke-width: 1.5;
    }
}

/* ----------  LocalOptFooterExtra ----------*/
.local-opt-footer-extra {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
    .divider-style {
        width: 1px;
        height: 12px;
        background-color: var(--Colors-Use-Basic-Background);
    }
}

.add-group-popover {
    padding-top: 0px;
    // border: 1px solid var(--Colors-Use-Neutral-Border);
    // border-radius: 4px;
    // overflow: hidden;
    :global {
        .ant-popover-arrow {
            display: none;
        }
        .ant-popover-inner-content {
            padding: 14px 0 0;
        }
    }
}

.ui-op-btn-wrapper {
    box-sizing: border-box;
    position: relative;
    cursor: pointer;

    .op-btn-body {
        border-radius: 4px;
        width: 24px;
        height: 24px;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .op-btn-body-hover {
        background-color: var(--Colors-Use-Neutral-Bg);
    }
    .icon-style {
        color: var(--Colors-Use-Neutral-Text-1-Title);
    }
    .icon-hover-style {
        color: var(--Colors-Use-Main-Primary);
    }
    .plus-icon {
        svg {
            width: 16px;
            height: 16px;
        }
    }
}
.ui-op-btn-wrapper:hover {
    .icon-style {
        color: var(--Colors-Use-Main-Primary);
    }
    .op-btn-body {
        background-color: var(--Colors-Use-Neutral-Bg);
    }
}
.infoBox {
    width: 100%;
    background: rgba(86, 201, 145, 0.1);
    color: rgba(133, 137, 158, 1);
    padding: 8px 16px;
    margin-bottom: 15px;
}

/* ---------- PluginsUploadHint ----------*/
.plugins-upload-hint-footer {
    justify-content: flex-end;
}
